{% extends "Themes/Dabbs/templates/page.twig" %}
{% block body_class %}single page-user single-post postid-129 single-format-standard nav_fixed p_indent comment-open site-layout-2{% endblock %}
{% block body %}
    <div class="content">
        {{ content() }}
        <ul class="tab-nav">
            <li><h1>{{ data.name }}的主页</h1></li>
            <li class="active">文章</li>
            <li class="">评论</li>
        </ul>
        <div class="tab-navcontent">
            <div class="item item-01 active">
                {% for item in entityList('node',['limit':15,'andWhere':[['conditions':'%uid% = :uid:','bind':['uid':id]]]]) %}
                    {{ view.r(nodeRender(item)) }}
                {% endfor %}
                <a type="submit" class="save_sort btn btn-success btn-block more">查看更多{{ data.name }}的文章
                </a>
            </div>
            <div class="clear"></div>
            <div class="item item-02">
                {% for item in entityList('comment',['limit':15,'andWhere':[['conditions':'%uid% = :uid:','bind':['uid':id]]]]) %}
                    <div class="comment-list-item">
                        <div class="date">
                            <span>{{ date('Y',item.changed) }}</span>
                            <span>{{ date('m-d',item.changed) }}</span>
                        </div>
                        <div class="comment-list-body">
                            <p class="comment-node">评论：<a href="{{ url(['for':'node','id':item.nid]) }}"
                                                          title="{{ item.node.title }}">{{ item.node.title }}</a></p>
                            <div class="comment-body">{{ item.body }}</div>
                        </div>
                    </div>
                    <div class="clear"></div>
                {% endfor %}
                <a type="submit" class="save_sort btn btn-success btn-block more">查看更多{{ data.name }}的评论
                </a>
            </div>
            <div class="clear"></div>
        </div>
    </div>
{% endblock %}
{% block right_box %}
    <aside class="sidebar">
        <div id="user-center-box" class="">
            <!-- table of contents -->
            <div class="box">
                <div class="user-info-face clear">
                    <img src="{% if data.face %}{{ data.face }}{% else %}/images/face/avatar.png{% endif %}"/>
                <a href="#" title="发消息" class="btn btn-info pull-right">发消息</a>
                    <div class="user-meta">
                        <p class="user-name">{{ data.name }}<b>LV 8</b></p>
                        <p class="score"><span href="javascript:;"><i aria-hidden="true"
                                                                      class="fa fa-ils"></i>{% if data.score %}{{ data.score }}{% else %}0{% endif %}</span><span><i
                                        aria-hidden="true"
                                        class="fa fa-btc"></i>{% if data.gold %}{{ data.gold }}{% else %}0{% endif %}</span>
                        </p>
                    </div>
                </div>
                <p class="description">{% if data.description %}{{ data.description }}{% else %}这个人很懒，什么都没有留下{% endif %}</p>
            </div>
            <h3>基本资料</h3>
            <ul id="user-action-list" class="box">
                <li><a href="#"><i aria-hidden="true" class="fa fa-lock"></i>性别：不能鉴定</a></li>
                <li><a href="#"><i aria-hidden="true" class="fa fa-phone"></i>手机: 公开<span
                                class="btn-small btn-error">未认证</span></a></li>
                <li><a href="#"><i aria-hidden="true" class="fa fa-envelope-square"></i>邮箱: 不公开<span
                                class="btn-small btn-success">未认证</span></a></li>
                <li><a href="#"><i aria-hidden="true" class="fa fa-question-circle-o"></i>QQ：保密</a></li>
                <li><a href="#"><i aria-hidden="true" class="fa fa-wpforms"></i>给他留言</a></li>
            </ul>
        </div>
    </aside>
{% endblock %}
{% block bottom %}
    <script src="/themes/tolowan/js/js.js"></script>
{% endblock %}
